import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:"/",
      redirect:"/index/movie"
    },
    {
      path:"/index",
      name:"index",
      component:()=>import("./views/Index.vue"),
      meta:{
        alive:true
      },
      children:[
        {
          path:"movie",
          name:"movie",
          component:()=>import("./views/Movie.vue"),
          meta:{
            alive:true
          }
        },{
          path:"cinema",
          name:"cinema",
          component:()=>import("./views/Cinema.vue"),
          meta:{
            alive:true
          }
        }
      ]
    },{
      path:"/movieDetail",
      name:"movieDetail",
      component:()=>import("./views/movieDetail.vue")
    }
  ]
})
